import { Application } from 'egg';

export default (app: Application) => {
    const { STRING, CHAR } = app.Sequelize;
    const model = app.model.define('Topic', {
        topic_id: { type: CHAR(32), primaryKey: true },//主键
        topic_title: STRING(32),//标题
        topic_picture: STRING(50),//背景图
        topic_status: CHAR(1),//状态（1,：停用，2：开启）
        created_by: CHAR(32),//创建人
        updated_by: CHAR(32),//更新人
        is_delete: CHAR(1),//标识是否删除（1：否，2：是）
    }, { tableName: 't_topic' });
    return model;
};
export class Topic {
    topic_id: string;
    topic_title: string;
    topic_picture: string;
    topic_status: string;
    created_by: string;
    updated_by: string;
    is_delete: string;
}